// class used for testing...
function SimpleObject( simpleValue ) {
	this.simpleValue = simpleValue;

	this.simpleMethod = function() {
		return true;
	}
}

SimpleObject.prototype.prototypeSimpleMethod = function() {
	return true;
}






function ObjectExtensionsTest() {

	ObjectExtensionsTest.prototype = new TestCase();
	TestCase.call( this, 'ObjectExtensionsTest' );
	
	this.setup = function() {
		this.simpleObject = new SimpleObject( 'someValue' );
	}
	
	this.test_hasMethodReturnsTrueIfGivenAnObjectAndTheNameOfAMethodThatExistsOnThatObject = function() {
		this.assertTrue( hasMethod( this.simpleObject, 'simpleMethod' ) );
	}

	this.test_hasMethodReturnsTrueIfGivenAnObjectAndTheNameOfAMethodThatExistsOnThePrototypeOfThatObject = function() {
		this.assertTrue( hasMethod( this.simpleObject, 'prototypeSimpleMethod' ) );
	}
	
	this.test_hasMethodReturnsFalseIfGivenTheNameOfAMethodThatDoesNotExistOnThatObject = function() {
		this.assertFalse( hasMethod( this.simpleObject, 'notASimpleMethod' ) );
		this.assertFalse( hasMethod( this.simpleObject, 'notASimpleMethod2' ) );
	}
	
	this.test_hasMethodReturnsFalseIfNotGivenAName = function() {
		this.assertFalse( hasMethod( this.simpleObject ) );
	}
	
	this.test_hasMethodReturnsGivenANullName = function() {
		this.assertFalse( hasMethod( this.simpleObject, null ) );
	}
	
	this.test_hasMethodReturnsGivenAnEmptyStringForAName = function() {
		this.assertFalse( hasMethod( this.simpleObject, '' ) );
	}
	
	this.test_hasMethodReturnsFalseIfTheMethodExistsButInADifferentCase = function() {
		this.assertFalse( hasMethod( this.simpleObject, 'SIMPLEMETHOD' ) );
	}
	
	this.test_hasMethodReturnsFalseIfTheMethodDoesNotExistButAMemberVariableDoes = function() {
		this.assertFalse( hasMethod( this.simpleObject, 'simpleValue' ) );
	}
	// TODO: Tests for when the object is null / not an object / etc
}

